import { createApp } from 'vue'
import App from './App.vue'
import './registerServiceWorker'
import router from './router'
import store from './store'
import api from '@/http/index'
import { setupI18n } from './i18n'

const i18n = setupI18n()
const app = createApp(App)
app.config.globalProperties.$isServer = typeof window === 'undefined'
app.config.globalProperties.$www = true
app.config.globalProperties.$api = api(store)
app.config.globalProperties.$store = store

app.use(i18n).use(store).use(router).mount('#app')
